<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>样式class数组绑定</title>
    <script src="vue.js"></script>
</head>
<body>
    <div id="app">
        <div @click="clickDivHandle" :style="[styleObj, {fontSize : '30px'}]">
            Hello World ...
        </div>
    </div>
<script>
    // 数组可以设定多个样式
    new Vue({
        el : "#app" ,
        data : {
            styleObj : {
                color : 'pink'
            }
        },
        methods : {
            clickDivHandle : function(){
                this.styleObj.color = this.styleObj.color === "pink" ? "blue" : "pink"
            }
        }
    })
</script>
</body>
</html>